{include file="admin/site_header.tpl"}
{include file="admin/dashboard/navi.tpl"}
{$i = $data.row}

<div id="container">
	<div class="inner-container">

		<div class="box box-100 greenbox">
			<div class="boxin">
				<div class="header">
					<h3>ID : {$i.categoryID} - {$i.title}</h3>
				</div>
				<div class="content" >
					<div class="quick-link">

		<!-- form -->			
		<style>
			label { display:inline-block;width:140px;padding:5px 0 5px 20px; }
		</style>			

		<form id="form_berita" class="form columns" action="{$site.site}adminajax/categoryUpdate/" method="POST" enctype="multipart/form-data">

			<input type="hidden" id="categoryID" 	name="categoryID"  	 value="{$i.categoryID}"/>
			<input type="hidden" id="order" name="order" value="{$data.order}"/>
			<input type="hidden" id="sort" 	name="sort"  value="{$data.sort}"/>
			<input type="hidden" id="page" 	name="page"  value="{$data.page}"/>
			<input type="hidden" id="limit" name="limit" value="{$data.limit}"/>
			
			<label>&nbsp;<b><span id="alert">{$data.msg}</span></b></label><br />
			<label>Category: </label>
				<input type="text" class="inputtext mandatory" id="title" name="title" value='{$i.title}' style="width:550px;"/> <br />
				<label>Section  : </label>

			<select id="sectionid" name="sectionid"><option>--Pilihan--</option>{foreach from=$data.section  item=x}<option value="{$x.sectionID}" {if $x.sectionID  eq $i.sectionID}selected{/if}>{$x.title}</option>{/foreach}</select><br />

			<label>Terbitkan: </label>
			
				<input type="radio" id="state" name="state" value="0" {$i.isUnPublish} /> Tidak
				<input type="radio" id="state" name="state" value="1" {$i.isPublish} /> Ya <br />
			

			<label style="margin-left:165px; padding:0; width:80px;">
			<button id="btnsave" value="save" class="button altbutton" type="submit"/>Submit</button>
			</label>

			<label style="margin-left:5px; padding:0; width:80px;">
			<button id="back" value="back" class="button altbutton" type="button"/>Back</button>
			</label>
		</form>
		<!-- end form -->
	
			</div><!-- .quick-link -->
		</div><!-- .content -->
	</div>
</div>

<script type="text/javascript">
$(document).ready(function(){
	$('#back').click( function (e) {
		top.location.href = "{$data.back}";
	});
	
});
</script>

{include file="admin/site_footer.tpl"}